<template>
  <div>
    <div class="outer">
        <h1>List</h1>
        <button @click="addData">向父组件发送数据</button>
    </div>
  </div>
</template>

<script>
export default {
name:'List',
data(){
    return{
        list:[
            {name:'xiaopacai',age:18},
            {name:'laopacai',age:18},
            {name:'taipacai',age:18},
            {name:'koujue',age:18},
        ]
    }
},
methods:{
    addData(){
        this.$emit('atguigu',this.list)
    }
}
}
</script>

<style scoped>
.outer{
    height: 200px;
    background: pink;
}
</style>